<%--
  Created by IntelliJ IDEA.
  User: dailyblue
  Date: 2023/4/2
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:if test="${empty EMP_LIST}">
    <c:redirect url="index.jsp">
        <c:param name="page" value="1"/>
    </c:redirect>
</c:if>
<html>
<head>
    <title>Title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

    <!-- Bootstrap 的 CSS 文件 -->
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.2/dist/css/bootstrap.min.css"
          integrity="sha384-xOolHFLEh07PJGoPkLv1IbcEPTNtaed2xpHsD9ESMhqIYd0nLMwNLD69Npy4HI+N" crossorigin="anonymous">

</head>
<body>

<table class="table">
    <thead class="thead-dark">
    <tr>
        <th scope="col">序号</th>
        <th scope="col">姓名</th>
        <th scope="col">职位</th>
        <th scope="col">上司ID</th>
        <th scope="col">入职时间</th>
        <th scope="col">工资</th>
        <th scope="col">奖金</th>
        <th scope="col">部门名</th>
        <th scope="col">操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach var="emp" items="${EMP_LIST}" varStatus="j">
        <tr>
            <td scope="row">${j.count}</td>
            <td>${emp.ename}</td>
            <td>${emp.job}</td>
            <td>${emp.mgr}</td>
            <td>${emp.hireDate}</td>
            <td>${emp.sal}</td>
            <td>${emp.comm}</td>
            <td>${emp.dept.dname}</td>
            <td><a href="#">删除</a></td>
        </tr>
    </c:forEach>
    </tbody>
    <tr>
        <th colspan="9">
            <nav aria-label="Page navigation example">
                <ul class="pagination justify-content-center">
                    <c:forEach var="i" begin="1" end="${ALL_PAGE_NUM}" step="1">
                        <li class="page-item"><a class="page-link" href="index.jsp?page=${i}">${i}</a></li>
                    </c:forEach>
                </ul>
            </nav>
        </th>
    </tr>
</table>
</body>
</html>
